import 'package:lib_service/models/share_object.dart';

class ShareUrlObject implements ShareObject {
  @override
  String type = 'url';

  @override
  String? title;

  @override
  String? description;

  @override
  String? thumbImage;

  String url;

  ShareUrlObject({
    this.title,
    this.description,
    this.thumbImage,
    required this.url,
  });

  @override
  Map<String, dynamic> toJson() {
    return {
      'type': type,
      if (title != null) 'title': title,
      if (description != null) 'description': description,
      if (thumbImage != null) 'thumbImage': thumbImage,
      'url': url,
    };
  }
}
